<h1>采购清单</h1>

<table>
  <tr>
    <th>采购日期</th>
    <th>采购部门</th>
    <th>供货单位</th>
  </tr>
  
<% for purchase in @purchases %>
  <tr>
    <td><%=h purchase.date %></td>
    <td><%=h purchase.by %></td>
    <td><%=h purchase.from %></td>
    <td><%= link_to 'Show', purchase_path(purchase) %></td>
    <td><%= link_to 'Edit', edit_purchase_path(purchase) %></td>
    <td><%= link_to 'Destroy', purchase_path(purchase), :confirm => '确定删除吗?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to '新增采购', new_purchase_path %>
